package com.etc.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * zj 用户实体类
 */
@Component
public class Users {
    /**
    * 编号
    */
    private Integer uId;

    /**
    * 用户姓名
    */
    private String uName;

    /**
    * 用户密码
    */
    private String uPassword;

    /**
    * 用户电话
    */
    private String uTel;

    /**
    * 用户性别
    */
    private String uSex;

    /**
    * 用户等级  0:用户 1:管理员
    */
    private Integer uLevel;

    /**
    * 用户状态 0:注销 1:使用
    */
    private Integer uStatus;

    /**
    * 用户头像
    */
    private String uImg;

    /**
    * 注册时间
    */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date uTime;

    public Integer getuId() {
        return uId;
    }

    public void setuId(Integer uId) {
        this.uId = uId;
    }

    public String getuName() {
        return uName;
    }

    public void setuName(String uName) {
        this.uName = uName;
    }

    public String getuPassword() {
        return uPassword;
    }

    public void setuPassword(String uPassword) {
        this.uPassword = uPassword;
    }

    public String getuTel() {
        return uTel;
    }

    public void setuTel(String uTel) {
        this.uTel = uTel;
    }

    public String getuSex() {
        return uSex;
    }

    public void setuSex(String uSex) {
        this.uSex = uSex;
    }

    public Integer getuLevel() {
        return uLevel;
    }

    public void setuLevel(Integer uLevel) {
        this.uLevel = uLevel;
    }

    public Integer getuStatus() {
        return uStatus;
    }

    public void setuStatus(Integer uStatus) {
        this.uStatus = uStatus;
    }

    public String getuImg() {
        return uImg;
    }

    public void setuImg(String uImg) {
        this.uImg = uImg;
    }

    public Date getuTime() {
        return uTime;
    }

    public void setuTime(Date uTime) {
        this.uTime = uTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", uId=").append(uId);
        sb.append(", uName=").append(uName);
        sb.append(", uPassword=").append(uPassword);
        sb.append(", uTel=").append(uTel);
        sb.append(", uSex=").append(uSex);
        sb.append(", uLevel=").append(uLevel);
        sb.append(", uStatus=").append(uStatus);
        sb.append(", uImg=").append(uImg);
        sb.append(", uTime=").append(uTime);
        sb.append("]");
        return sb.toString();
    }

    public Users(Integer uId, String uName, String uPassword, String uTel, String uSex, Integer uLevel, Integer uStatus, String uImg, Date uTime) {
        this.uId = uId;
        this.uName = uName;
        this.uPassword = uPassword;
        this.uTel = uTel;
        this.uSex = uSex;
        this.uLevel = uLevel;
        this.uStatus = uStatus;
        this.uImg = uImg;
        this.uTime = uTime;
    }


    public Users(String uName, String uPassword) {
        this.uName = uName;
        this.uPassword = uPassword;
    }


    public Users(Integer uId, String uName, String uPassword,String uSex) {
        this.uId = uId;
        this.uName = uName;
        this.uPassword = uPassword;
        this.uSex = uSex;
    }

    public Users(String uName, String uPassword, String uTel, String uSex) {
        this.uName = uName;
        this.uPassword = uPassword;
        this.uTel = uTel;
        this.uSex = uSex;
    }

    public Users(String uName, String uPassword, String uTel, String uSex, Integer uLevel, Integer uStatus, String uImg, Date uTime) {
        this.uName = uName;
        this.uPassword = uPassword;
        this.uTel = uTel;
        this.uSex = uSex;
        this.uLevel = uLevel;
        this.uStatus = uStatus;
        this.uImg = uImg;
        this.uTime = uTime;
    }

    public Users(String uName, String uPassword, String uTel, String uSex, String uImg) {
        this.uName = uName;
        this.uPassword = uPassword;
        this.uTel = uTel;
        this.uSex = uSex;
        this.uImg = uImg;
    }

    public Users() {
    }
}